<?php

namespace App\Http\Controllers\Page;

use App\Http\Controllers\Controller;

class UserController extends Controller
{
	public function center()
    {
        return view('user.center');
    }

    public function manage()
    {
        return view('user.manage');
    }

    public function qrcode()
    {
        return view('user.qrcode');
    }

    /**
     * 用户优惠卷
     * @return mixed
     */
    public function coupon()
    {
        return view('user.coupon');
    }

    public function orderlist()
    {
        return view('user.orderlist');
    }

    public function orderdetail()
    {
        return view('user.orderdetail');
    }

    public function usercenter()
    {
        return view('user.usercenter');
    }

    public function fan()
    {
        $data = [];

        $data['fans_0'] = auth()->user()->fans()->count();
        $data['fans_1'] = auth()->user()->fans()->where('status', 7)->count();

        return view('user.fanlist', $data);
    }
}